﻿using Gma.QrCodeNet.Encoding;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Windows.ApplicationModel.Resources;
using Windows.UI.Xaml.Media;

namespace HAOest.QrCodeForWin8.Model
{
    public class QrCode
    {
        private string prefix;
        private string text;
        private CodeType codeType;

        public CodeType CodeType
        {
            get
            {
                return codeType;
            }
            set
            {
                switch (value)
                {
                    case CodeType.Text:
                        prefix = CodePrefix.Text;
                        break;
                    case CodeType.Tel:
                        prefix = CodePrefix.Tel;
                        break;
                }
                codeType = value;
            }
        }
        public string Text
        {
            get
            {
                return prefix + text;
            }
            set
            {
                text = value;
            }
        }

        public Brush DarkBrush { get; set; }
        public Brush LightBrush { get; set; }
        public ErrorCorrectionLevel ErrorCorrectionLevel { get; set; }
    }
}
